$('#flash-content').empty();
<%- if flash[:alert] %>
  $('#flash-content').append('<div class="alert"><%= escape_javascript(flash[:alert]) %></div>');
  $('#flash').fadeIn('slow');
<%- else %>
  $('#app-files').hide(150, function() {
    $('#app-files').replaceWith('<%= escape_javascript(render "apps/files/app_files", :locals => {:file_contents => @file_contents}) %>');
    $('#app-files').show(150);
  });
<%- end %>